package com.ruoyi.common.core.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.ArrayList;
import java.util.List;

/**
 * Tree基类
 *
 * @author ruoyi
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "TreeEntity", description = "树基类")
public class TreeEntity extends BaseEntity {
    @Serial
    private static final long serialVersionUID = 1L;

    /** 父菜单名称 */
    @Schema(description = "父菜单名称")
    private String parentName;

    /** 父菜单ID */
    @Schema(description = "父菜单ID")
    private Long parentId;

    /** 显示顺序 */
    @Schema(description = "显示顺序")
    private Integer orderNum;

    /** 祖级列表 */
    @Schema(description = "祖级列表")
    private String ancestors;

    /** 子部门 */
    @Schema(description = "子部门")
    private List<?> children = new ArrayList<>();

}
